Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Developing Applications > Using Domino REST Services > What's new in IBM Domino Access Services Release 9.0.1 FP8
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Optimizing DAS data API performance

Abstract Domino Access Services (DAS) is a family of REST APIs built into IBM Domino and available from the https:extlib.openntf.orgXPages Extension Library on OpenNTF. The DAS data API is used to create, read, update and delete data in any Domino server application. This article ...

What's new in IBM Domino Access Services Release 9.0.1 FP8

Domino Access Services (DAS) is a family of REST APIs for accessing Domino resources over HTTP and HTTPS. IBM Domino 9.0.1 FP8 includes several changes to DAS. This article describes what's new in 9.0.1 FP8.
Community articleWhat's new in IBM Domino Access Services Release 9.0.1 FP8
Added by ~Chris Chufanabergynds | Edited by ~Chris Chufanabergynds on March 23, 2017 | Version 9
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
Domino Access Services (DAS) is a family of REST APIs for accessing Domino resources over HTTP and HTTPS. IBM Domino 9.0.1 FP8 includes several changes to DAS. This article describes what's new in 9.0.1 FP8.
ShowTable of Contents
HideTable of Contents
  • 1 Data API lowercasefields parameter
  • 2 Data API fields parameter
  • 3 Data API view entries limit
  • 4 Meeting updates with the Calendar API
  • 5 Calendar API sincenow and days parameters
  • 6 Core API statistics resource
  • 7 OpenAPI Specifications on GitHub

Data API lowercasefields parameter

The document resource GET operation now supports a lowercasefields parameter.  This can help an API client resolve JSON case sensitivity issues.

Suppose you send a GET request to this URL:

/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0


The response might include mixed case field names like this:

{

  "@href": "/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0",

  "@unid": "39A95ECD82D0DEB485257AB5005BFEE0",

  "@noteid": "5D26",

  "@created": "2012-11-13T16:44:50Z",

  "@modified": "2013-07-16T21:39:28Z",

  "@form": "Contact",

  "Id": "CN=Aaron Goodman/O=renovations",

  "FirstName": "Aaron",

  "LastName": "Goodman",

  "City": "Philadelphia",

  "State": "PA",

  "EMail": "aaron_goodman@renovations.com"

}

 

Notice how FirstName and LastName are mixed case. However, because Notes and Domino item names are not case sensitive, the case may change from one document to the next.  To force all JSON property names to lower case, you can instead use this URL:

/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0?lowercasefields=true


Now the response will look like this:

{

  "@href": "/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0",

  "@unid": "39A95ECD82D0DEB485257AB5005BFEE0",

  "@noteid": "5D26",

  "@created": "2012-11-13T16:44:50Z",

  "@modified": "2013-07-16T21:39:28Z",

  "@form": "Contact",

  "id": "CN=Aaron Goodman/O=renovations",

  "firstname": "Aaron",

  "lastname": "Goodman",

  "city": "Philadelphia",

  "state": "PA",

  "email": "aaron_goodman@renovations.com"

}

 

Data API fields parameter

The document resource GET operation now supports a fields parameter.  This can help an API client improve performance by limiting the size of the response.

Again, suppose you send a GET request to this URL:

/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0


The response might include several application-specific field names like Id, FirstName, LastName, City, State and EMail:

{

  "@href": "/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0",

  "@unid": "39A95ECD82D0DEB485257AB5005BFEE0",

  "@noteid": "5D26",

  "@created": "2012-11-13T16:44:50Z",

  "@modified": "2013-07-16T21:39:28Z",

  "@form": "Contact",

  "Id": "CN=Aaron Goodman/O=renovations",

  "FirstName": "Aaron",

  "LastName": "Goodman",

  "City": "Philadelphia",

  "State": "PA",

  "EMail": "aaron_goodman@renovations.com"

}

 

If you only want to read FirstName and LastName, you can instead use this URL:

/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0?fields=firstname,lastname


Now the response will look like this:

{

  "@href": "/xpagesext.nsf/api/data/documents/unid/39A95ECD82D0DEB485257AB5005BFEE0",

  "@unid": "39A95ECD82D0DEB485257AB5005BFEE0",

  "@noteid": "5D26",

  "@created": "2012-11-13T16:44:50Z",

  "@modified": "2013-07-16T21:39:28Z",

  "@form": "Contact",

  "FirstName": "Aaron",

  "LastName": "Goodman"

}

 

Data API view entries limit

The view entries resource GET operation now limits the number of entries returned in a response.  This can potentially effect existing applications.

Suppose your API client requests 200 entries using this URL:

/xpagesext.nsf/api/data/collections/name/allcontacts?count=200


Prior to 9.0.1 FP8, the data API would return the specified number of entries (if available).  As of 9.0.1 FP8, the data API will instead return HTTP 400 (Bad request):

{

  "code": 400,

  "text": "Bad Request",

  "message": "Limit exceeded.  Cannot read more than 100 entries."

}

 

IBM made this change to encourage paging through large views for better performance and scalability.  However, if the change breaks existing applications, you can adjust the limit with a server notes.ini setting.  For example, this setting increases the limit to 2000 entries:

DataServiceMaxViewEntries=2000


IBM recommends keeping the limit as low as possible.  Ideally, you want each view entries request to complete quickly and you want your Domino server to be able to handle many simultaneous requests.

 

Meeting updates with the Calendar API

Prior to 9.0.1 FP8, it could be difficult to update a meeting with the calendar API because the calendar API enforced strict sequencing of updates.  Consider this meeting in JSON format:

{

  "events": [

    {

      "href": "/mail/dlawson.nsf/api/calendar/events/1D28F84D78AE721A852580EA005E4D07-Lotus_Auto_Generated",

      "id": "1D28F84D78AE721A852580EA005E4D07-Lotus_Auto_Generated",

      "summary": "Calendar API test",

      "location": "test",

      "description": "test\r\n",

      "start": {

        "date": "2017-04-01",

        "time": "15:00:00",

        "utc": true

      },

      "end": {

        "date": "2017-04-01",

        "time": "16:00:00",

        "utc": true

      },

      "class": "public",

      "transparency": "opaque",

      "sequence": 5,

      "last-modified": "20170321T171606Z",

      "attendees": [

        {

          "role": "chair",

          "status": "accepted",

          "rsvp": false,

          "displayName": "Duke Lawson/Renovations",

          "email": "DukeLawson@renovations.com"

        },

        {

          "role": "req-participant",

          "status": "needs-action",

          "rsvp": true,

          "displayName": "Dean Melnyk/Renovations",

          "email": "deanmelnyk@renovations.com"

        }

      ],

      "organizer": {

        "displayName": "Duke Lawson/Renovations",

        "email": "DukeLawson@renovations.com"

      },

      "x-lotus-broadcast": {

        "data": "FALSE"

      },

      "x-lotus-notesversion": {

        "data": "2"

      },

      "x-lotus-appttype": {

        "data": "3"

      }

    }

  ]

}

 

Notice the value of the sequence property is 5.  Now suppose you want to reschedule the meeting to a different time.  You send a PUT request with a JSON representation of the update to this URL:

/mail/dlawson.nsf/api/calendar/events/1D28F84D78AE721A852580EA005E4D07-Lotus_Auto_Generated


But if you neglect to include the sequence property in your JSON input, versions of the API prior to 9.0.1 FP8 return HTTP 409 (Conflict):

{

  "code": 409,

  "text": "Conflict",

  "cserror": 1027,

  "message": "Error updating event",

  "type": "text",

  "data": "..."

}

 

Older versions of the API strictly enforce sequencing of updates to avoid unintended version conflicts, but this can complicate the implementation of your API client.  As of 9.0.1 FP8, the calendar API relaxes the checking of sequence numbers.  If for any reason you prefer the old behavior, you can add the strictsequence parameter to the PUT URL:

/mail/dlawson.nsf/api/calendar/events/1D28F84D78AE721A852580EA005E4D07-Lotus_Auto_Generated?strictsequence=true

 

Calendar API sincenow and days parameters

The event collection resource GET operation now supports sincenow and days parameters.  These parameters make it simpler to request events in a date range relative to now.

Prior to 9.0.1 FP8, you could request a list of events in an absolute data range.  For example, a GET request to the following URL returns all events in the month of April:

/mail/dlawson.nsf/api/calendar/events?since=2017-04-01T00:00:00Z&before=2017-05-01T00:00:00Z


As of 9.0.1 FP8, you can instead use the sincenow and days parameters to request events in a relative date range.  The sincenow parameter specifies the start of the date range relative to now.  The days parameter specifies the length of the date range.

For example, you can request events for the next 30 days:

/mail/dlawson.nsf/api/calendar/events?days=30


Or you can request 30 days of events starting 30 days after now:

/mail/dlawson.nsf/api/calendar/events?sincenow=30&days=30


Or you can request 60 days of events starting 30 days before now:

/mail/dlawson.nsf/api/calendar/events?sincenow=-30&days=60

 

Core API statistics resource

The DAS core API now includes a statistics resource.  This resource represents DAS usage statistics on your Domino server.  It groups API requests by category (e.g. calendarReadEvent, calendarUpdateEvent, dataViewEntryCollections, etc.).  For each category it tracks the:

  • total number of requests
  • total time (in milliseconds) for all requests
  • average time (in milliseconds) for all requests

To read the statistics resource, you send a GET request to:

/api/core/stats


The response looks something like this:

{

  "calendarReadEventAvgRequestTime": 78,

  "calendarReadEventRequestTime": 156,

  "calendarReadEventRequests": 2,

  "calendarTotalAvgRequestTime": 231,

  "calendarTotalRequestTime": 2545,

  "calendarTotalRequests": 11,

  "calendarUpdateEventAvgRequestTime": 250,

  "calendarUpdateEventRequestTime": 250,

  "calendarUpdateEventRequests": 1,

  "calendarViewEventsAvgRequestTime": 267,

  "calendarViewEventsCount10_to_50": 6,

  "calendarViewEventsCountUnder_10": 2,

  "calendarViewEventsRequestTime": 2139,

  "calendarViewEventsRequests": 8,

  "coreTotalAvgRequestTime": 7,

  "coreTotalRequestTime": 78,

  "coreTotalRequests": 10,

  "dataDbCollectionAvgRequestTime": 149,

  "dataDbCollectionRequestTime": 749,

  "dataDbCollectionRequests": 5,

  "dataDocCollectionAvgRequestTime": 24,

  "dataDocCollectionRequestTime": 6623,

  "dataDocCollectionRequests": 268,

  "dataDocumentAvgRequestTime": 19,

  "dataDocumentRequestTime": 37601,

  "dataDocumentRequests": 1911,

  "dataTotalAvgRequestTime": 20,

  "dataTotalRequestTime": 60249,

  "dataTotalRequests": 2896,

  "dataViewCollectionAvgRequestTime": 15,

  "dataViewCollectionRequestTime": 46,

  "dataViewCollectionRequests": 3,

  "dataViewDesignAvgRequestTime": 2,

  "dataViewDesignRequestTime": 16,

  "dataViewDesignRequests": 6,

  "dataViewEntryCollectionAvgRequestTime": 25,

  "dataViewEntryCollectionRequestTime": 15151,

  "dataViewEntryCollectionRequests": 601,

  "dataViewEntryRequestTime": 31,

  "dataViewEntryRequests": 45,

  "totalAvgRequestTime": 21,

  "totalRequestTime": 62872,

  "totalRequests": 2924

}

 

OpenAPI Specifications on GitHub

Although not technically part of 9.0.1 FP8, IBM has simultaneously been working set of OpenAPI specifications for the DAS APIs.  These specifications are now available in a new repository on GitHub:

https://github.com/OpenNTF/das-api-specs

 

These specifications represent DAS APIs in the industry standard OpenAPI format.  You can use the specifications with a broad range of Swagger tools.


  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (9)
collapsed Versions (9)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (9)Mar 23, 2017, 6:28:59 PM~Chris Chufanabergynds  
8Mar 23, 2017, 6:23:02 PM~Arnold Breamanlen  
7Mar 23, 2017, 6:17:50 PM~Arnold Breamanlen  
6Mar 23, 2017, 6:08:28 PM~Arnold Breamanlen  
5Mar 23, 2017, 6:01:38 PM~Arnold Breamanlen  
4Mar 23, 2017, 5:50:43 PM~Arnold Breamanlen  
3Mar 23, 2017, 5:42:39 PM~Arnold Breamanlen  
2Mar 23, 2017, 5:40:35 PM~Arnold Breamanlen  
1Mar 23, 2017, 5:37:04 PM~Arnold Breamanlen  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility